Quitting Without Saving Press Return. If you have made changes, vi does not let you quit with :q . Instead, it displays the following message. If you do not ...
To exit without saving changes made: · Press < Escape> . (You must be in insert or append mode if not, just start typing on a blank line to enter that mode) ...
I'll get the warning about unsaved changes. To really quit without saving changes, I'll follow their suggestion and add the ! to the end of the command. So, ...
Exit Without Saving Changes in Vi / Vim To exit Vim without saving changes: 1. Switch to command mode by pressing the Esc key. Using Vim Modes · How to Save Changes in Vim · Vim Save and Quit Command
If you've made mistakes along the way while editing and want to back out (abandon) all non-saved changes, enter Command mode by pressing Esc and typing :q! This command quits without saving any changes and exits Vi. Note: Always make a copy of an ex